<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::get('goods-detail','Api\ProductTempController@goodsDetail');
Route::get('temp-detail','Api\ProductTempController@tempDetail');
Route::get('temp-info/{temp_id}','Api\ProductTempController@tempInfoH5');
Route::get('announcements/detail/{announcement_id?}','Api\AnnouncementsController@getDetail');
Route::post('order/expressnotify', 'Api\Order\OrderController@postExpressnotify');
Route::get('other/about','Api\OtherController@getAbout');
Route::get('other/overflow','Api\OtherController@overflow');
Route::post('other/android-version', 'Api\OtherController@getAndroidVersionNow');
Route::post('pay/alipay-notify','Api\Pay\PayController@alipayNotify');
Route::post('pay/weixin-notify','Api\Pay\PayController@weixinNotify');
Route::post('pay/transfer-accounts-notify','Api\Pay\PayController@transferAccountsNotify');
Route::post('pay/alirefund-notify', 'Api\Pay\PayController@alirefund_notify');
Route::post('other/config','Api\OtherController@getConfig');
//Route::post('img/save','Api\ImgController@saveImg');
Route::group(['middleware' => ['cors'], 'namespace'=>'Api'], function() {
	Route::group(['namespace'=>'Order','prefix' =>'order'], function(){
		Route::post('test',['uses'=>'OrderController@test','as'=>'order.test']);
	});
	Route::group(['namespace'=>'Car','prefix' =>'shopcar'], function(){
		Route::post('test',['uses'                             =>'CarController@test','as'=>'car.test']);
		Route::post('add-shopping-car',['uses'                 =>'CarController@postAddShoppingCar']);
		Route::post('car-select',['uses'                       =>'CarController@postCarSelect']);
		Route::post('shop-car-clean-from-invalid',['uses'      =>'CarController@shopCarCleanFromInvalid']);
		Route::post('shop-car-check-all-or-cancel-all',['uses' =>'CarController@postShopCarCheckAllOrCancelAll']);
		Route::post('shop-car-list',['uses'                    =>'CarController@postShopCarList']);
		Route::post('edit-car-complete',['uses'                =>'CarController@postEditCarComplete']);
		Route::post('shop-car-submit',['uses'                  =>'CarController@shopCarSubmit']);
		Route::post('buy-immediately-submit',['uses'           =>'CarController@buyImmediatelySubmit']);
		Route::post('delete-shop-car',['uses'				   =>'CarController@deleteShopCar']);
	});
	Route::group(['namespace'=>'Coupons','prefix' =>'coupons'], function(){
		Route::post('test',['uses'                    =>'CouponsController@test','as'=>'coupons.test']);
		Route::post('my-coupons',['uses'              =>'CouponsController@postMyCoupons']);
		Route::get('qrcode',['uses'                   =>'CouponsController@getQrcode']);
		Route::post('user-union-coupons',['uses'      =>'CouponsController@postUserUnionCoupons']);
		Route::post('shop-car-coupons',['uses'        =>'CouponsController@postShopCarCoupons']);
		Route::post('buy-immediately-coupons',['uses' =>'CouponsController@buyImmediatelyCoupons']);
		Route::post('coupon-pool-from-active',['uses' => 'CouponsController@coupon_pool_from_active']);
	});
	Route::group(['namespace'=>'Message','prefix' =>'message'], function(){
//		Route::post('test',['uses'            =>'JPushController@test','as'=>'message.test']);
		Route::post('show-push-list',['uses'  =>'JPushController@postShowPushList']);
		Route::post('message-un-read',['uses' =>'JPushController@postMessageUnRead']);
		Route::post('delete-push',['uses'     =>'JPushController@postDeletePush']);
		Route::post('push-class-list',['uses' =>'JPushController@postPushClassList']);
	});
	Route::group(['namespace'=>'Statistics','prefix'=>'statistics'],function(){
		Route::post('test',['uses'                       =>'IncomeController@test']);
		Route::post('my-incomes',['uses'                 =>'IncomeController@myIncomes']);
		Route::post('draw',['uses'                       =>'IncomeController@draw']);
		Route::post('income-statement',['uses'           =>'IncomeController@incomeStatement']);
		Route::post('withdraw-statement',['uses'         =>'IncomeController@withdrawStatement']);
		Route::post('get-data-by-apply-withdraw',['uses' =>'IncomeController@getDataByApplyWithdraw']);
		Route::post('user-bank-card-binding',['uses'     =>'UserBankController@userBankCardBinding']);
		Route::post('update-bank-card-info',['uses'      =>'UserBankController@updateBankCardInfo']);
		Route::post('apply-withdraw',['uses'             =>'IncomeController@applyWithdraw']);
//		Route::post('alipay-auth',['uses'                =>'UserBankController@alipayAuth']);
//		Route::post('user-alipay-binding',['uses'        =>'UserBankController@userAlipayBinding']);
		Route::post('user-bank-list',['uses'      => 'UserBankController@user_bank_list']);
		Route::post('sms-set-password',['uses'    => 'UserBankController@sms_set_password_to_withdraw']);
		Route::post('set-password', ['uses'       => 'UserBankController@set_password']);
//		Route::post('sms-reset-password',['uses'  => 'UserBankController@sms_reset_password_to_withdraw']);
//		Route::post('reset-password', ['uses'     => 'UserBankController@reset_password']);
//		Route::post('sms-forget-password',['uses' => 'UserBankController@sms_forget_password_to_withdraw']);
//		Route::post('forget-password', ['uses'    => 'UserBankController@forget_password']);
		Route::post('new-bank-card', ['uses'      => 'UserBankController@new_bank_card']);
		Route::post('delete-bank-card', ['uses'   => 'UserBankController@delete_bank_card']);
		Route::post('apply-withdraw-page',['uses' => 'IncomeController@apply_withdraw_page']);
		Route::post('apply-withdraw-new',['uses'  => 'IncomeController@apply_withdraw_new']);
	});
	Route::group(['namespace'=>'Order','prefix'=>'order'],function(){
		Route::post('test',['uses'                            =>'OrderController@test']);
		Route::post('create-order-by-shop-car',['uses'        =>'OrderController@createOrderByShopCar']);
		Route::post('create-order-by-buy-immediately',['uses' =>'OrderController@createOrderByBuyImmediately']);
		Route::post('user-order-all',['uses'                  =>'OrderController@userOrderAll']);
		Route::post('user-order-unpay',['uses'                =>'OrderController@userOrderUnpay']);
		Route::post('user-order-unsend',['uses'               =>'OrderController@userOrderUnsend']);
		Route::post('user-order-unsign',['uses'               =>'OrderController@userOrderUnsign']);
		Route::post('user-order-complete',['uses'             =>'OrderController@userOrderComplete']);
		Route::post('order-detail',['uses'                    =>'OrderController@orderDetail']);
		Route::post('order-cancel',['uses'                    =>'OrderController@orderCancel']);
		Route::post('order-express-detail',['uses'            =>'OrderController@orderExpressDetail']);
		Route::post('order-sign',['uses'                      =>'OrderController@orderSign']);
		Route::post('order-urge',['uses'                      =>'OrderController@orderUrge']);
		Route::post('submit-aftermark',['uses'                =>'OrderController@submitAftermark']);
		Route::post('user-order-aftermark',['uses'            =>'OrderController@userOrderAftermark']);
		Route::post('get-express-company',['uses'             =>'OrderController@getExpressCompany']);
		Route::post('submit-order-aftermark-express',['uses'  =>'OrderController@submitOrderAftermarkExpress']);
		Route::post('order-delete',['uses'                    =>'OrderController@orderDelete']);
		Route::post('order-aftermark-express-detail',['uses'  =>'OrderController@orderAftermarkExpressDetail']);
		Route::post('order-aftermark-detail',['uses'          =>'OrderController@getAftermarkDetail']);
		Route::post('order-aftermark-sign',['uses'            =>'OrderController@orderAftermarkSign']);
		Route::post('order-work-sheet',['uses'                =>'OrderController@orderWorkSheet']);
		Route::post('create-order-by-buy-immediately-active',
			        ['uses'                                   => 'OrderController@createOrderByBuyImmediatelyActive']);
	});
	Route::group(['namespace'=>'Pay','prefix'=>'pay'],function(){
		Route::post('alipay',['uses'                   =>'PayController@alipay']);
		// Route::post('alipay-notify',['uses'            =>'PayController@alipayNotify']);
		// Route::post('weixin-notify',['uses'            =>'PayController@weixinNotify']);
		Route::post('wx-pay',['uses'                   =>'PayController@wxPay']);
		Route::post('coupon-pay',['uses'               =>'PayController@couponPay']);
		Route::get('alipay-web', ['uses'                  => 'PayController@alipay_web']);
		// Route::post('transfer-accounts-notify',['uses' =>'PayController@transferAccountsNotify']);
	});
	Route::group(['prefix'=>'other'],function(){
		Route::post('feed-back',['uses'=>'OtherController@feed_back']);
		Route::post('test',['uses'=>'OtherController@test']);
	});
});
